<?php

namespace App\Providers;

use App\Services\ConfigService;
use App\Services\NavigationService;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        /**
         * 视图公共数据
         */
        view::share('siteConfig', ConfigService::getSiteConfig()); // 站点配置
        view::share('guestbookConfig', ConfigService::getGuestbookConfig()); // 留言咨询配置
        view::share('navigationBar', NavigationService::getBarByIdName('top')); // 网站顶部导航
    }
}
